import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: ()=>{
        return import("@/views/IndexView.vue")
      },
    },
    {
      path:"/perfume",
      component:()=>{
        return import("@/views/PerfumeView.vue")
      }
    },
    {
      path:"/my",
      component:()=>{
        return import("@/views/MyView.vue")
      }
    },
    {
      path:"/ingredient",
      component:()=>{
        return import("@/views/IngredientView.vue")
      }
    },
    {
      path:"/bland",
      component:()=>{
        return import("@/views/BlandView.vue")
      }
    },
    {
      path:"/shop",
      component:()=>{
        return import("@/views/ShopView.vue")
      }
    },
    {
      path:"/perfume/detail",
      component:()=>{
        // @ts-ignore
        return import("@/views/detail/perfumeDetail.vue")
      }
    },
    {
      path:"/fragrance",
      component:()=>{
        return import("@/views/detail/IngredientDetail.vue")
      }
    },
    {
      path:"/ingredient/choosePerfume",
      component:()=>{
        return import("@/views/detail/ChoosePerfumeDetail.vue")
      }
    },
    {
      path:"/brand/detail",
      component:()=>{
        return import('@/views/detail/BrandDetail.vue')
      }
    },
    {
      path:"/register",
      component:()=>{
        return import("@/views/auth/Register.vue")
      }
    },
    {
      path:"/forget",
      component:()=>{
        return import("@/views/auth/ForgetPassword.vue")
      }
    }
  ],
})

export default router
